import { $get, $post } from '@/api/request'
const gateUrl = '/basic'

// 校区列表
export function getSchoolAreaInfoList (data) {
  return $post({
    url: `${gateUrl}/district/query/page`,
    data
  })
}

// 编辑校区
export function updateSchoolAreaInfo (data) {
  return $post({
    url: `${gateUrl}/district/update`,
    data
  })
}

// 新增校区
export function addSchoolAreaInfo (data) {
  return $post({
    url: `${gateUrl}/district/add`,
    data
  })
}

// 校区列表选项查询
export function getSchoolAreaNameList () {
  return $get({
    url: `${gateUrl}/district/query/districtName`
  })
}

// 删除校区
export const deleteSchoolAreaInfo = No => {
  return $post({
    url: `${gateUrl}/district/delete/` + No
  })
}

// 获取学校
export function getSchool (data) {
  return $get({
    url: `${gateUrl}/school/getAllList`,
    data
  })
}
